# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Andre Klitzing <aklitzing () online () de>

pkgname=libytnef
pkgver=2.1.2
pkgrel=1
epoch=1
pkgdesc="Yerase's TNEF stream reader library (decodes winmail.dat)"
arch=('loong64' 'x86_64')
url='https://github.com/Yeraze/ytnef'
license=('GPL')
depends=('glibc')
optdepends=('perl: ytnefprocess command')
source=("https://github.com/Yeraze/ytnef/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha256sums=('340f03f495884611209e9c0bc943fad06ce920e8c79655aa228d5ca7418dc360')

prepare() {
  cd ytnef-$pkgver
  ./autogen.sh
}

build() {
  cd ytnef-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd ytnef-$pkgver
  make DESTDIR="$pkgdir" install
}
